package com.yunhe.openapi.client;

import com.yunhe.common.model.ResultObject;
import com.yunhe.openapi.client.fallback.MeasHistoryClientFallback;
import com.yunhe.openapi.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

@ApiIgnore
@FeignClient(value = "ems-meas-history", fallbackFactory = MeasHistoryClientFallback.class,configuration = FeignConfig.class)
//开发环境用下方配置
//@FeignClient(url = "http://47.108.95.55:9999/ems-meas-history", value = "ems-meas-history", fallbackFactory = MeasHistoryClientFallback.class,configuration = FeignConfig.class)
@Component
public interface MeasHistoryClient {

    //获取点号历史量测数据
    @RequestMapping(value = "/1/measurements/batch", method = RequestMethod.GET)
    ResponseEntity<ResultObject> getHistoryData(@RequestParam("pointNumbers") String pointNumbers, @RequestParam("dtime") String dtime);

}
